﻿using System.Linq.Expressions;

namespace Entropy.Ext
{
	/// <summary>
	/// A function called when the button is clicked (can be used instead of click event).
	/// </summary>
	public delegate void ButtonHandler(IButton button, object e);
	/// <summary>
	/// Fires when this button is clicked, before the configured handler is invoked. Execution of the handler may be vetoed by returning false to this event.
	/// </summary>
	public delegate void ButtonClick(IButton button, object e, object eOpts);


	[JsClass("Ext.button.Button", "button")]
	public interface IButton : IComponent
	{
		Expression<ButtonClick> click { get; set; }
	}
}